<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <script>
  //定义函数
   //方式一：直接调用
      function foo() {
        console.log("foo函数：",this)
      }
 
  //方式二：通过对象调用
  var obj = {name:"why"}
  obj.aaa=foo
  obj.aaa()//指向obj对象

//3.调用方式三：通过call/apply调用
foo.call("abc");//String{"abc"}对象
  
  </script>
</body>
</html>